package com.gtw.modules.sys.service.impl;

import com.gtw.modules.dao.TbCapitalpoolDao;
import com.gtw.modules.entity.TbCapitalpool;
import com.gtw.modules.sys.service.TbCapitalpoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by wuye on 2018/3/18.
 */
@Service
public class TbCapitalpoolServiceImpl implements TbCapitalpoolService {

    @Autowired
    private TbCapitalpoolDao tbCapitalpoolDao;

    @Override
    public List<TbCapitalpool> queryByAll() {
        return tbCapitalpoolDao.queryByAll();
    }

    @Override
    public TbCapitalpool queryById(Integer id) {
        return tbCapitalpoolDao.selectByPrimaryKey(id);
    }

    @Override
    public void save(TbCapitalpool tbCapitalpool) {
        tbCapitalpoolDao.insert(tbCapitalpool);
    }

    @Override
    public int update(TbCapitalpool tbCapitalpool) {
        return tbCapitalpoolDao.updateByPrimaryKey(tbCapitalpool);
    }
}
